//2009/08/18 16:50:47
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <sstream>
#include <algorithm>

using namespace std;

class AccessChanger
{
public:
    vector <string> convert(vector <string> program)
    {
        vector<string> ret;
        for (int i=0; i<program.size(); i++)
        {
            ret.push_back(convString(program[i]));
        }
		return ret;
    }
private:
    string convString(string s)
    {
		for(int i=0; i<s.size() -1; i++)
		{
			if(s[i]=='/' && s[i+1]=='/') return s;
			if(s[i]=='-' && s[i+1]=='>')
			{
				s[i]='.';
				s.erase(s.begin() + i + 1);
				return convString(s);
			}
		}
		return s;
    }
};
